Developer(s) | Center for Computation and Technology at LSU |
---|---|
Stable release | 1.6 / October 16, 2011 |
Written in | C++, Python |
Platform | Cross-platform |
Type | Grid computing / Distributed Computing library |
License | Boost Software License |
Website | http://saga-project.org |
The SAGA C++ Reference Implementation is a set of free cross-platform libraries written in C++ and Python which provide a set of high-level interfaces and runtime components that allow the development of distributed computing and grid computing applications, frameworks and tools. SAGA is the first complete implementation of the Open Grid Forum Simple API for Grid Applications standard GFD-R-P.90[1]. SAGA is available for all major operating systems, including Linux and other Unix-like systems, Microsoft Windows and Mac OS X. SAGA is open source and licensed under the Boost Software License.
SAGA can be used to develop scalable and portable large-scale distributed applications, frameworks and tools. SAGA supports many of the widely used distributed grid middleware systems, like Globus, Condor, UNICORE and gLite as well as cloud computing services like Amazon EC2 and Eucalyptus.
Contents |
SAGA is designed as an object oriented interface. It encapsulates related functionality in a set of objects, that are grouped in functional namespaces, which are called packages in SAGA. The SAGA core implementation defines the following packages:[2]
The overall architecture of SAGA follows the adaptor pattern, a software design pattern which is used for translating one interface into another. In SAGA it translates the calls from the API packages to the interfaces of the underlying middleware. The SAGA run-time system uses late-binding to decide at run-time which plug-in (middleware adaptor) to load and bind.[3]
The following table lists the distributed middleware systems that are currently supported by SAGA. The column labeled Adaptor Suite names the collection (release package) of the (set of) middleware adaptors that provides support for the middleware system.
Middleware System | SAGA Adaptor Suite | SAGA API Namespace |
---|---|---|
Amazon EC2 | saga-adaptors-aws | saga::job |
Condor | saga-adaptors-condor | saga::job |
Eucalyptus | saga-adaptors-aws | saga::job |
Globus GRAM (2 and 5) | saga-adaptors-globus | saga::job |
Globus GridFTP | saga-adaptors-globus | saga::filesystem |
Globus RLS | saga-adaptors-globus | saga::replica |
HDFS | saga-adaptors-hdfs | saga::file |
Local File system | part of saga-core | saga::file |
Local Fork | part of saga-core | saga::job |
Nimbus | saga-adaptors-aws | saga::job |
PBS (Pro) | saga-adaptors-pbs | saga::job |
Platform LSF | saga-adaptors-lsf | saga::job |
SQL Advert Service | part of saga-core | saga::advert |
SQL Replica Service | part of saga-core | saga::replica |
SSHFS | saga-adaptors-ssh | saga::file |
SSH | saga-adaptors-ssh | saga::job |
TORQUE | saga-adaptors-torque | saga::job |
A typical task in a distributed application is to submit a job to a local or remote distributed resource manager. SAGA provides a high-level API called the job package for this. The following two simple examples show how the SAGA job package API can be used to submit an MPI job to a remote Globus GRAM resource manager.
C++:
#include <saga/saga.hpp> int main (int argc, char** argv) { namespace sa = saga::attributes; namespace sja = saga::job::attributes; try { saga::job::description jd; jd.set_attribute (sja::description_executable, "/home/user/hello-mpi"); jd.set_attribute (sja::description_output, "/home/user/hello.out"); jd.set_attribute (sja::description_error, "/home/user/hello.err"); // Declare this as an MPI-style job jd.set_attribute (sja::description_spmd_variation, "mpi"); // Name of the queue we want to use jd.set_attribute (sja::description_queue, "checkpt"); jd.set_attribute (sja::description_spmd_variation, "mpi"); // Number of processors to request jd.set_attribute (sja::description_number_of_processes, "32"); saga::job::service js("gram://my.globus.host/jobmanager-pbs"); saga::job::job j = js.create_job(jd); j.run() } catch(saga::exception const & e) { std::cerr << "SAGA exception caught: " << e.what() << std::endl; } }
Python:
import saga try: jd = saga.job.description() jd.executable = "/home/user/hello-mpi" jd.error = "/home/user/hello.err" jd.output = "/home/user/hello.out" # Declar this as an MPI-style job jd.spmd_variation = "mpi" # Name of the queue we want to use jd.queue = "checkpt" # Number of processors to request jd.number_of_processes = "32" # URL of the resource manager. In this case Globus GRAM js = saga.job.service("gram://my.globus.host/jobmanager-pbs") job = js.create_job(jd) job.run() except saga.exception, e: print e.get_all_messages()